//* images routines

function Images(ASet,ACount) {
  // load multiple images into array of images, used for monsters animation, must be in "img/ASet/ASetX.png" where X is 0,1,2,...,N 
  this.images = new Array();
  for (var i=0; i<ACount; i++) {
    this.images[i] = new Image();
    this.images[i].src = 'img/'+ASet+'/'+ASet+i+'.png';
  }
  this.draw = function(AFrame,ALeft,ATop) {
    // draw image and increment frame automaticaly
    context.drawImage(this.images[AFrame%this.images.length],ALeft,ATop); //-this.images[this.frame].width/2,-this.images[this.frame].height/2);
  }
}
